<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>新经资讯后台管理</title>
	<link rel="stylesheet" type="text/css" href="../../static/admin/css/reset.css">
	<link rel="stylesheet" type="text/css" href="../../static/admin/css/main.css">
	<link rel="stylesheet" type="text/css" href="../../static/admin/css/jquery.pagination.css">
	<script src="../../static/admin/js/jquery-1.12.4.min.js"></script>
	<script src="../../static/admin/js/jquery.pagination.min.js"></script>
</head>
<body>
	<div class="breadcrub">
			当前位置：产品管理>产品分类管理
		</div>
		<form method='post' action="/static/admin/delCateAll">
		<div class="pannel">
			<table class="common_table">
					<tr>
							<td colspan="6"><a href="../../static/admin/addcate" class="addtype">增加分类</a></td>
						</tr>
	
				<tr>
					<th width="10%">id</th>
					<th width="20%">名称</th>
					<th width="30%">图片</th>
					<th width="10%">是否首页推荐</th>
					<th width="10%">是否显示</th>
					<th width="20%">操作</th>
				</tr>
				{% for i in catelist %}
				<tr>
					<th width="10%"><input type='checkbox' name='ids' value="{{i.id}}">{{i.id}}</th>
					<th width="20%">{{i.name}}</th>
					<th width="30%"><img src='{{i.image_url}}' width=100 height=100></th>
					<th width="10%">{% if i.is_recommend == 1%} 是 {% else %}否{% endif %}</th>
					<th width="10%">{% if i.is_show == 1%} 是 {% else %}否{% endif %}</th>
					<td><a href="../../static/admin/addcate?id={{i.id}}">修改</a> 删除</td>
				</tr>
				{% endfor %}
				<tr><td><button type='submit'>批量删除</button></td></tr>
			</table>
		</from>
		</div>
		<div id="pagination">
				
			</div>
		
</body>
<script>
$(function(){
	$("#pagination").pagination({
		totalPage:{{totalpage}},
		currentPage:{{p}},
		callback:function(current){
			window.location.href="/sadmin/catelist?p="+current
		}
	})
})
</script>
</html>